import {
  get,
  post,
  //postForm,
  del
} from '@/utils/http'
const packageName = `/back-api`

/**
 * 导出
 */
export function fileDownload(url, params) {
  return post(`${packageName}/${url}`, params)
}

/**
 * 登录
 */
export function login(params) {
  return post(`${packageName}/sysUser/login`, params)
}

/**
 * 退出
 */
export function loginOut(params) {
  return post(`${packageName}/sysUser/loginOut`, params)
}

/**
 * 系统角色
 */
// 获取系统角色列表
export function getSysRoleList(params) {
  return get(`${packageName}/sysRole/getSysRoleList`, params)
}
// 获取全部系统角色
export function getSysRoles(params) {
  return get(`${packageName}/sysRole/getSysRoles`, params)
}
// 获取系统角色详情
export function getSysRole(params) {
  return get(`${packageName}/sysRole/getSysRole`, params)
}
// 删除系统角色
export function delSysRole(params) {
  return del(`${packageName}/sysRole/delSysRole`, params)
}
// 保存系统角色
export function saveSysRole(params) {
  return post(`${packageName}/sysRole/saveSysRole`, params)
}
// 获取角色菜单
export function getRoleMenus(params) {
  return get(`${packageName}/sysRole/getRoleMenus`, params)
}
// 获取用户权限菜单
export function getUserRoleMenus(params) {
  return get(`${packageName}/sysRole/getUserRoleMenus`, params)
}
// 保存角色权限菜单
export function saveRoleMenus(params) {
  return post(`${packageName}/sysRole/saveRoleMenus`, params)
}

/**
 * 系统账号
 */
// 获取系统账号列表
export function getSysUserList(params) {
  return get(`${packageName}/sysUser/getSysUserList`, params)
}
// 获取全部用户列表
export function getSysUsers(params) {
  return get(`${packageName}/sysUser/getSysUsers`, params)
}
// 获取系统账号详情
export function getSysUser(params) {
  return get(`${packageName}/sysUser/getSysUser`, params)
}
// 删除系统账号
export function delSysUser(params) {
  return del(`${packageName}/sysUser/delSysUser`, params)
}
// 保存系统账号
export function saveSysUser(params) {
  return post(`${packageName}/sysUser/saveSysUser`, params)
}
// 启用/禁用
export function openOrCloseSysUser(params) {
  return post(`${packageName}/sysUser/openOrClose`, params)
}

/**
 * 系统日志
 */
// 获取系统日志列表
export function getSysLogList(params) {
  return get(`${packageName}/sysLoginLog/getSysLogList`, params)
}

export function getObjBoxList(params) {
  return get(`${packageName}/objBox/getObjBoxList`, params)
}
export function getObjBox(params) {
  return get(`${packageName}/objBox/getObjBox`, params)
}
export function getObjBoxs(params) {
  return get(`${packageName}/objBox/getObjBoxs`, params)
}
export function getObjBoxInfo(params) {
  return get(`${packageName}/objBox/getObjBoxInfo`, params)
}

export function saveObjBox(params) {
  return post(`${packageName}/objBox/saveObjBox`, params)
}
export function delObjBox(params) {
  return del(`${packageName}/objBox/delObjBox`, params)
}
export function getSysCompanyBases(params) {
  return get(`${packageName}/sysCompanyBase/getSysCompanyBases`, params)
}
export function getObjBoxTaskList(params) {
  return get(`${packageName}/configFishpondTask/getObjBoxList`, params)
}
export function saveConfigFishpondTasks(params) {
  return post(`${packageName}/configFishpondTask/saveConfigFishpondTasks`, params)
}
export function sendBaseBoxCmd(params) {
  return post(`${packageName}/configFishpondTask/sendBaseBoxCmd`, params)
}
export function getSysFishTypes(params) {
  return get(`${packageName}/sysFishType/getSysFishTypes`, params)
}
/*
开关状态
*/
export function openOrCloseSwitch(params) {
  return post(`${packageName}/objBox/openOrCloseSwitch`, params)
}
// 获取排程模板
export function getConfigFishpondModelList(params) {
  return get(`${packageName}/configFishpondModel/getConfigFishpondModelList`, params)
}
//保存排程模板
export function saveConfigFishpondModel(params) {
  return post(`${packageName}/configFishpondModel/saveConfigFishpondModel`, params)
}
// 获取配置鱼池任务模板
export function getConfigFishpondModel(params) {
  return get(`${packageName}/configFishpondModel/getConfigFishpondModel`, params)
}
// 获取配删除鱼池任务模板
export function delConfigFishpondModel(params) {
  return del(`${packageName}/configFishpondModel/delConfigFishpondModel`, params)
}
// 获取所有排水分组
export function getDischargeWaterGroupIds(params) {
  return get(`${packageName}/configFishpondTask/getDischargeWaterGroupIds`, params)
}
// 获取所有排水分组的鱼池
export function getDischargeWaterGroupIdFishponds(params) {
  return get(`${packageName}/configFishpondTask/getDischargeWaterGroupIdFishponds`, params)
}
// 获取配删除鱼池任务表格
export function delConfigFishpondTasksByChart(params) {
  return del(`${packageName}/configFishpondTask/delConfigFishpondTasksByChart`, params)
}
// 保存任务配置模板
export function saveConfigFishpondTasksByChart(params) {
  return post(`${packageName}/configFishpondTask/saveConfigFishpondTasksByChart`, params)
}
// 获取排程任务
export function getConfigFishpondTask(params) {
  return get(`${packageName}/configFishpondTask/getConfigFishpondTask`, params)
}
// 获取首页控制箱信息和鱼池下的设备列表
export function getObjBoxFishpondDevices(params) {
  return get(`${packageName}/dataHisSwitch/getObjBoxFishpondDevices`, params)
}
//开关状态
export function updateConfigFishpondModelStatus(params) {
  return post(`${packageName}/configFishpondModel/updateConfigFishpondModelStatus`, params)
}
//基地排程任务导出（模板id）
export function taskExportExcel(params) {
  return post(`${packageName}/configFishpondTask/schedulingExportExcel`, params)
}
// // 基地控制箱任务下发（基地id）
// export function sendBaseBoxCmd(params) {
//   return post(`${packageName}/configFishpondTask/sendBaseBoxCmd`, params);
// }
//获取水阀分组（排水分组id）
export function getConfigFishpondValves(params) {
  return get(`${packageName}/configFishpondTask/getConfigFishpondValves`, params)
}
// 获取巡检任务列表
export function getDataTaskInspectList(params) {
  return get(`${packageName}/dataTaskInspect/getDataTaskInspectList`, params)
}
// 删除巡检任务
export function delDataTaskInspect(params) {
  return del(`${packageName}/dataTaskInspect/delDataTaskInspect`, params)
}
//同步时间
export function boxTimeCheck(params) {
  return post(`${packageName}/objBox/boxTimeCheck`, params)
}
//获取全部配置鱼池数值型设备关系（控制箱id）
export function getConfigFishpondDeviceNumericalRelations(params) {
  return get(`${packageName}/configFishpondDeviceNumericalRelation/getConfigFishpondDeviceNumericalRelations`, params)
}
// 获取全部配置鱼池开关型设备关系(控制箱id)
export function getConfigFishpondDeviceSwitchRelations(params) {
  return get(`${packageName}/configFishpondDeviceSwitchRelation/getConfigFishpondDeviceSwitchRelations`, params)
}
//获取整治任务列表
export function getDataTaskRenovateList(params) {
  return get(`${packageName}/dataTaskRenovate/getDataTaskRenovateList`, params)
}
//获取整治任务结果(整治任务id)
export function getDataTaskRenovateResult(params) {
  return get(`${packageName}/dataTaskRenovate/getDataTaskRenovateResult`, params)
}
//获取整治任务
export function getDataTaskRenovate(params) {
  return get(`${packageName}/dataTaskRenovate/getDataTaskRenovate`, params)
}
//删除整治任务
export function delDataTaskRenovate(params) {
  return del(`${packageName}/dataTaskRenovate/delDataTaskRenovate`, params)
}
//保存整治任务
export function saveDataTaskRenovate(params) {
  return post(`${packageName}/dataTaskRenovate/saveDataTaskRenovate`, params)
}

//获取用户推送列表
export function getSysUserPushList(params) {
  return get(`${packageName}/sysUserPush/getSysUserPushList`, params)
}
//获取用户推送
export function getSysUserPush(params) {
  return get(`${packageName}/sysUserPush/getSysUserPush`, params)
}
//删除用户推送
export function delSysUserPush(params) {
  return del(`${packageName}/sysUserPush/delSysUserPush`, params)
}
//保存用户推送
export function saveSysUserPush(params) {
  return post(`${packageName}/sysUserPush/saveSysUserPush`, params)
}
//投料任务导出（模板id）
export function feedingExportExcel(params) {
  return post(`${packageName}/configFishpondTask/feedingExportExcel`, params)
}
//投料任务下发（基地id）
export function saveDataHisSendtoFeedTask(params) {
  return post(`${packageName}/configFishpondTask/saveDataHisSendtoFeedTask`, params)
}
//获取全部鱼池（控制箱id）
export function getFishpondsByBoxId(params) {
  return get(`${packageName}/configFishpondTask/getFishpondsByBoxId`, params)
}
// 告警记录处理
export function saveDataScheduleTaskAlarmStatus(params) {
  return post(`${packageName}/dataHisSwitch/saveDataScheduleTaskAlarmStatus`, params)
}
//获取增氧，排污换水，投料列表
export function getConfigAutoTaskGroupList(params) {
  return get(`${packageName}/configAutoTaskGroup/getConfigAutoTaskGroupList`, params)
}
//获取自动排程分组投喂列表(分组id)
export function getConfigAutoTaskGroupFeedList(params) {
  return get(`${packageName}/configAutoTaskGroupFeed/getConfigAutoTaskGroupFeedList`, params)
}
//删除增氧，排污换水，投料
export function delConfigAutoTaskGroup(params) {
  return del(`${packageName}/configAutoTaskGroup/delConfigAutoTaskGroup`, params)
}
//保存增氧，排污换水，投料
export function saveConfigAutoTaskGroup(params) {
  return post(`${packageName}/configAutoTaskGroup/saveConfigAutoTaskGroup`, params)
}
//保存自动排程分组投喂
export function saveConfigAutoTaskGroupFeed(params) {
  return post(`${packageName}/configAutoTaskGroupFeed/saveConfigAutoTaskGroupFeed`, params)
}
//获取自动排程配置(基地id)
export function getConfigAutoTaskConfig(params) {
  return get(`${packageName}/configAutoTaskConfig/getConfigAutoTaskConfig`, params)
}
//保存自动排程配置
export function saveConfigAutoTaskConfig(params) {
  return post(`${packageName}/configAutoTaskConfig/saveConfigAutoTaskConfig`, params)
}
//获取排程预览
export function getConfigAutoTaskConfigPreview(params) {
  return get(`${packageName}/configAutoTaskConfig/getConfigAutoTaskConfigPreview`, params)
}
//获取增氧，排污换水，投料
export function getConfigAutoTaskGroup(params) {
  return get(`${packageName}/configAutoTaskGroup/getConfigAutoTaskGroup`, params)
}
//保存基地排程
export function saveAutoTask(params) {
  return post(`${packageName}/configAutoTaskConfig/saveAutoTask`, params)
}
//获取备份记录
export function getSysMysqlDump(params) {
  return get(`${packageName}/sysCompany/getSysMysqlDump`, params)
}
//获取全部控制箱（基地id）（除服务器监测）
export function getObjBoxsOutServer(params) {
  return get(`${packageName}/objBox/getObjBoxsOutServer`, params)
}
//消息推送历史记录
export function getDataHisPushList(params) {
  return get(`${packageName}/sysUserPush/getDataHisPushList`, params)
}
